home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 233 / Computer Shopper 233 / ComputerShopperDVD233.iso / Assets / Interface / Main.dxr / Movie Scripts_7_Step by step install MIAW.ls < prev    next >
Encoding:
Text File  |  2005-05-17  |  3.9 KB  |  101 lines

  1. global dataSource, installDialog
  2.  
  3. on popupDialog sourceNode
  4.   mwmDisableControls()
  5.   installDialog = window().new("stepinstall")
  6.   installDialog.fileName = getVolume() & "assets\interface\install"
  7.   installDialog.type = #dialog
  8.   stagePosn = _player.windowList[1].rect
  9.   dialogWidth = installDialog.rect[3] - installDialog.rect[1]
  10.   dialogHeight = installDialog.rect[4] - installDialog.rect[2]
  11.   stageWidth = stagePosn[3] - stagePosn[1]
  12.   stageHeight = stagePosn[4] - stagePosn[2]
  13.   xOrigin = integer(stagePosn[1] + (stageWidth / 2))
  14.   yOrigin = stagePosn[4] - dialogHeight - 13
  15.   xEnd = xOrigin + dialogWidth
  16.   yEnd = yOrigin + dialogHeight
  17.   installDialog.rect = rect(xOrigin, yOrigin, xEnd, yEnd)
  18.   dialogTitle = sourceNode.child[1].attributeValue["title"]
  19.   dialogBody = sourceNode.attributeValue["text"]
  20.   if dialogTitle <> VOID then
  21.     installDialog.movie.sprite(1).setTitle("ABOUT", dialogTitle)
  22.   else
  23.     installDialog.movie.sprite(1).setTitle("ABOUT", "THIS ADVERTISEMENT")
  24.   end if
  25.   currentLink = sourceNode.child[1]
  26.   repeat with linkNum = 1 to currentLink.child.count
  27.     currentStep = currentLink.child[linkNum]
  28.     if (currentStep.attributeValue["label"] <> VOID) and (currentStep.attributeValue["href"] <> VOID) then
  29.       installDialog.movie.sprite(1).setStep(currentStep.attributeValue["text"], currentStep.attributeValue["label"], currentStep.attributeValue["href"])
  30.       next repeat
  31.     end if
  32.     installDialog.movie.sprite(1).setStep(currentStep.attributeValue["text"])
  33.   end repeat
  34.   installDialog.movie.sprite(1).paneContent.doneSetting()
  35.   installDialog.title = "Computer Shopper"
  36.   installDialog.moveToFront()
  37.   installDialog.open()
  38. end
  39.  
  40. on stepDialog me, secNum, entNum, linkNum
  41.   mwmDisableControls()
  42.   currentSec = dataSource.findSection(secNum)
  43.   currentLink = currentSec["entries"].child[entNum + 1]["links"].child[linkNum]
  44.   installDialog = window().new("stepinstall")
  45.   installDialog.fileName = getVolume() & "assets\interface\install"
  46.   installDialog.type = #dialog
  47.   stagePosn = _player.windowList[1].rect
  48.   dialogWidth = installDialog.rect[3] - installDialog.rect[1]
  49.   dialogHeight = installDialog.rect[4] - installDialog.rect[2]
  50.   stageHeight = stagePosn[4] - stagePosn[2]
  51.   xOrigin = stagePosn[1] + 7
  52.   yOrigin = stagePosn[4] - dialogHeight - 13
  53.   xEnd = xOrigin + dialogWidth
  54.   yEnd = yOrigin + dialogHeight
  55.   installDialog.rect = rect(xOrigin, yOrigin, xEnd, yEnd)
  56.   dialogTask = currentLink.attributeValue["task"]
  57.   dialogTitle = currentLink.attributeValue["title"]
  58.   if dialogTitle <> VOID then
  59.     installDialog.movie.sprite(1).setTitle(dialogTask, dialogTitle)
  60.   else
  61.     entryTitle = currentSec["entries"].child[entNum + 1].attributeValue["title"]
  62.     installDialog.movie.sprite(1).setTitle("HOW TO INSTALL", toUppercase(entryTitle))
  63.   end if
  64.   repeat with linkNum = 1 to currentLink.child.count
  65.     currentStep = currentLink.child[linkNum]
  66.     if (currentStep.attributeValue["label"] <> VOID) and (currentStep.attributeValue["href"] <> VOID) then
  67.       installDialog.movie.sprite(1).setStep(currentStep.attributeValue["text"], currentStep.attributeValue["label"], currentStep.attributeValue["href"])
  68.       next repeat
  69.     end if
  70.     installDialog.movie.sprite(1).setStep(currentStep.attributeValue["text"])
  71.   end repeat
  72.   installDialog.movie.sprite(1).paneContent.doneSetting()
  73.   installDialog.moveToFront()
  74.   installDialog.open()
  75. end
  76.  
  77. on mwmDisableControls
  78.   sprite("Content pane").disableControls()
  79.   sprite("Footer bar2").disableControls()
  80. end
  81.  
  82. on mwmEnableControls
  83.   dataSource.setBarColours(sprite("Content pane").sections.selectedIndex)
  84.   sprite("Content pane").enableControls()
  85.   sprite("Footer bar2").enableControls()
  86. end
  87.  
  88. on mwmEnableControlsCreditsSelected
  89.   dataSource.setBarColours(sprite("Content pane").sections.selectedIndex)
  90.   sprite("Content pane").enableControls()
  91.   sprite("Footer bar2").enableControlsCreditsSelected()
  92. end
  93.  
  94. on resetFooter
  95.   sprite("Footer bar2").resetFooter()
  96. end
  97.  
  98. on resetCentre
  99.   sprite("Centre pane").resetPane()
  100. end
  101.